package com.mybatiscore.jiaocheng.d07mybatis_分页查询;

import com.mybatiscore.Mapper.TRoleMapper;
import com.mybatiscore.POJO.TRole;
import com.mybatiscore.Util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class d01不用插件 {
    @Test
    public void test(){
        int pageNum=3;

        int pageSize=4;

        int siz=(pageNum-1)*pageSize;

        SqlSession sqlSession = SqlSessionUtil.openSession();
        TRoleMapper mapper = sqlSession.getMapper(TRoleMapper.class);
        List<TRole> tRoles = mapper.selectFY(siz, pageSize);
        System.out.println(tRoles.toString());
        sqlSession.close();

        int i=0;
    }
}
